package com.china08.yxyapi.repository.mg;

import java.util.Date;
import java.util.List;

import org.springframework.data.mongodb.repository.MongoRepository;

import com.china08.yxyapi.entity.mg.sws.SwsPvForDailyAnalyze;

public interface SwsPvForDailyAnalyzeRepository extends MongoRepository<SwsPvForDailyAnalyze, String> {

    SwsPvForDailyAnalyze findBySchoolIdAndDateForPv(String schoolId, Date startDate);

    SwsPvForDailyAnalyze findBySchoolId(String schoolId);

    SwsPvForDailyAnalyze findBySchoolIdAndYearForPvAndMonthForPvAndDayForPv(String schoolId, Integer yearForPv,
            Integer monthForPv, Integer dayForPv);
    /**
     * 通过当前年月和学校id查询记录
     * @param schoolId
     * @param year
     * @param month
     * @return
     */
    List<SwsPvForDailyAnalyze> findBySchoolIdAndYearForPvAndMonthForPv(
            String schoolId, int year, int month);

}
